<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security" xmlns:auth=""
>
<head>
    <th:block th:include="common/head::noXadmin('修改系统参数')"/>
    <script type="application/javascript" th:src="@{/static/js/jquery.min.js}"></script>
    <script type="application/javascript" th:src="@{/static/lib/ztree/js/jquery.ztree.all.min.js}"></script>
    <link rel="stylesheet" type="text/css" th:href="@{/static/lib/ztree/css/metroStyle/metroStyle.css}"/>
</head>
<body class="layui-layout layui-layout-admin">
<div class="layui-container">
    <form class="layui-form " th:action="@{/pm/task/add}" method="post">
        <div class="layui-row layui-col-space30 " style="margin: 0px 30px 0px 30px ">
            <div class="layui-col-md6">
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>基本信息</legend>
                </fieldset>
                <div class="layui-form-item">
                    <label class="layui-form-label">任务名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="taskName" autocomplete="off" placeholder="请输入任务名称"
                               class="layui-input"
                               required lay-verify="required" th:value="${task?.taskName}" >
                    </div>
                </div>

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">任务描述</label>
                    <div class="layui-input-block">
                    <textarea placeholder="任务描述" class="layui-textarea" name="remark"
                              th:text="${config?.remark}" ></textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row ">
            <div class="layui-form-item">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="ok">保存</button>
                <button type="reset" class="layui-btn layui-btn-danger" lay-filter="close">重置</button>
            </div>
        </div>
    </form>

</div>

<script>
    layui.use(['form', 'layedit', 'laydate'], function () {
        var form = layui.form
            , layer = layui.layer
        ;
        var code = '[[${code}]]';
        var message = '[[${message}]]';


        if (code == 200) {
            layer.confirm(message, {
                icon: 1,
                title: '提示',
                btn: ["继续", "关闭"]
            }, function (index) {
                layer.close(index);
            }, function (index) {
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                parent.layer.close(index); //再执行关闭
            });
        }
        form.on('submit(ok)', function (data) {

            return true;
        })
    });
</script>

</body>

</html>